Interfaces for computer hardware devices are connected to controllers such as servers and other computer systems to allow the controllers to communicate with and control the hardware devices. Often, the interface takes the form of hardware such as an interface card or other module. When developing the interface for such a hardware device, the device itself is typically needed to be connected to the interface so that the interface components may be tested thoroughly to determine if they function correctly and accurately. However, some hardware devices may not be available for such interface testing due to a variety of reasons. For example, the hardware device may not be finalized or fully produced, or only exist in low quantities, or it may be difficult to obtain due to availability in its development cycle or for cost reasons.
In such cases in which the hardware device is not available for interface testing, an emulator can be used in place of the hardware device during testing of the interface. Emulation is used to enable one system to imitate or duplicate the functions of a second system. This allows the first system to accept the same data, achieve the same results, etc., as the second system. Emulators can be used in the development of interfaces for hardware devices; for example, the hardware device can be replaced by the emulator to facilitate printed circuit board (PCB) card debugging and development testing, PCB card testing in manufacturing, interface and controller software evaluation, and performance testing. The emulators allow the interface for a hardware device to be produced and tested before the hardware device exists in large quantities, or debugged at a low level without introducing the side effects of a debugger.
For example, when developing code or firmware of an interface for a hardware device like a print engine that is used to print documents on paper or other media, the hardware device can be emulated using a hardware emulator or software emulator. The hardware emulator is hardware that mimics the behavior, signals, and responses of the print engine or other hardware device, so that the code and other components of the interface can be tested in a realistic environment.
A system 10 using a hardware emulator is illustrated in the block diagram of FIG. 1. The system includes a controller 12 that intends to interface with the hardware device, such as a print engine 18. The controller 12 provides commands and data to an interface card 14, which can include embedded circuitry and code on an integrated circuit (IC) chip 16. The interface card 14 would normally output commands and data to, and receive signals from, the print engine 18. However, since the print engine 18 may not be available or conveniently obtained, an emulator card 20 can be physically connected to the same electrical connections that the print engine 18 would normally be connected to. The emulator card 20 can imitate signals of the print engine 18 to test the functional code and other components of the interface card 14 and controller 12.
Alternatively, a software emulator can be used to test the operation of a system including an interface and hardware device. For example, a computer system, such as controller 12 in FIG. 1, can run a software emulator that emulates the function and signals of both a connected interface card 14 and a hardware device connected to the interface card, such as print engine 18, without having to connect the actual interface card and hardware device to the computer system. This allows other control software running on the controller 12, which would normally communicate with the interface card 14 and device 16, to be tested in a realistic environment.
These emulators used in device test systems for developing interfaces have several disadvantages, however. For example, hardware emulators are hardwired in many of their functions and difficult to update with changes that may be needed in an emulation. Furthermore, this emulation requires additional steps such as physically connecting the emulator card to the interface card and independently powering the emulator card. The software emulators running on systems like controller 12 do not test many potential problems of interface card components, such as integrated circuit code, and timing and hardware device response, since the software emulator does not include actual hardware and cannot, for example, accurately produce timing conditions for the hardware device. Software timing is also degraded since the software emulator steals processing cycles from the driver and other software running on the controller 12.
Accordingly, what is needed is an apparatus and method for providing an emulator for a hardware device in the development of an interface for that device, which allows the testing of a variety of problems of the interface and is easily updated and modified. The present invention addresses such a need.